﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UTIL
{
    public class KZSettings
    {
        private static readonly string kzMapURL = "https://cosy-climbing.net/maps.php/{0}/DemoDownloader/";
        private static readonly string kzMapPictureURL = "https://cosy-climbing.net/img/maps/";
        private static readonly string kzXMLURL = "https://cosy-climbing.net/api/";
        private static readonly string kzDemoURL = "https://cosy-climbing.net/e107_files/downloads/demos/";
        private static readonly string kzDemoFolder = "demos/";

        private static readonly List<string> kzXMLFiles = new List<string>() { "demos", "country", "jumpers", "maps", "last_release" };

        public static string DemoURL
        {
            get
            {
                return kzDemoURL;
            }
        }

        public static string DemoFolder
        {
            get
            {
                return kzDemoFolder;
            }
        }

        public static List<string> XMLFiles
        {
            get
            {
                return kzXMLFiles;
            }
        }

        public static string XMLURL(string file)
        {
            return String.Format("{0}{1}", kzXMLURL, file);
        }

        public static string MapPictureURL(string mapName)
        {
            return String.Format("{0}{1}.png", kzMapPictureURL, mapName.Split('[')[0]);
        }

        public static string MapURL(int currentMapID)
        {
            return String.Format(kzMapURL, currentMapID.ToString());
        }
    }
}